package io.renren.modules.order.controller;

import io.renren.common.utils.R;
import io.renren.modules.order.service.OrderService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

//因为web模块和用户模块无法直接通信，我需要再次重写一次这个用户模块的订单
@RestController
@RequestMapping("/order")
public class OrderController {
    @Resource
    private OrderService orderService;
    @RequestMapping("/update")
    public R update(@RequestParam("orderCode") String orderCode,@RequestParam("orderStatus") Integer orderStatus){
        return R.ok().put("code",orderService.updateOrderStatus(orderCode,orderStatus));

    }
}
